package com.example.bes014.springcloud.nacos.config.demo.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Value(value = "${hello:false}")
    private String hello;

    @Value(value = "${aaa:a}")
    private String aaa;

    @Value(value = "${bbb:b}")
    private String bbb;

    @Value(value = "${ccc:c}")
    private String ccc;

    @Value(value = "${ddd:d}")
    private String ddd;

    @GetMapping
    public String hello() {
        System.out.println(hello);
        System.out.println(aaa);
        System.out.println(bbb);
        System.out.println(ccc);
        System.out.println(ddd);
        return hello;
    }
}
